package com.qys.livesMall.anchor.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qys.livesMall.anchor.model.dto.lives.app.BanUserDTO;
import com.qys.livesMall.anchor.model.entity.LivesRoomAdmin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 直播间管理员表(LivesRoomAdmin)表数据库访问层
 *
 * @author makejava
 * @since 2023-09-12 10:02:05
 */
public interface LivesRoomAdminMapper extends BaseMapper<LivesRoomAdmin> {

    void banUser(BanUserDTO dto);


    /**
     * 查询我未关注的人
     * @param userId
     * @return
     */
    List<String> queryMyUnfollowedUser(Long userId);

    /**
     * 查询未关注我的人
     * @param userId
     * @return
     */
    List<String> queryNotFollowMeUser(Long userId);

    /**
     * 判断用户是否被封禁
     * @param livesSessionId
     * @param userId
     * @return
     */
    int userIsban(@Param("livesSessionId") Long livesSessionId, @Param("userId") Long userId);

    /**
     * 重置直播状态，让直播间可重复开播
     */
    void refreshStatus(Long sessionId);
}

